package de.openkanban.server.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import de.openkanban.server.dao.HistoryDao;
import de.openkanban.server.domain.History;
import de.openkanban.server.service.HistoryService;
import de.openkanban.shared.util.HistoryAction;
import de.openkanban.shared.util.StatusCodes;

@Service
public class HistoryServiceImpl implements HistoryService{

	@Autowired
	HistoryDao historyDao;

	@Override
	public StatusCodes writeHistoryEntry(Long boardId, Long userId, Long activityId, HistoryAction historyAction, String text) {
		return historyDao.writeHistoryEntry(boardId, userId, activityId, historyAction, text);
	}

	@Override
	public History[] getFullBoardHistory(Long boardId) {
		return historyDao.getFullBoardHistory(boardId);
	}

	@Override
	public StatusCodes writeHistoryEntry(Long userId, Long parentActivityId, HistoryAction createKanban, String historyText) {
		return historyDao.writeHistoryEntry(userId, parentActivityId, createKanban, historyText);
	}
	
}
